﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="AreaInfo4JS.Web.index" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <%------- 脚本引用 -------%>
    <script type="text/javascript" src="/scripts/jquery.js"></script>
    <script type="text/javascript" src="/scripts/GlobalProvinces_main.js"></script>
    <script type="text/javascript" src="/scripts/GlobalProvinces_extend.js"></script>
    <script type="text/javascript" src="/scripts/initLocation.js"></script>
    <%------- 脚本引用 -------%>
    <title></title>
    <script type="text/javascript">
        $(
            function ()
            {
                var gpm = new GlobalProvincesModule;
                var testProvinceId = gpm.getProvinceIdByName("广西省");
                alert(testProvinceId);

                var defaultOption = 
                    {
                        sheng_val: "5",
                        shi_val: "1",
                        xian_val: "1",
                        xiang_val: "1"
                    };

                initLocation(defaultOption);
            })

        function BtnClick()
        {
            $("#hid_province").val($("#sheng").find("option:selected").text());
            $("#hid_city").val($("#shi").find("option:selected").text());
            $("#hid_country").val($("#xian").find("option:selected").text());
            $("#hid_street").val($("#xiang").find("option:selected").text());
        }
    </script>
</head>
<body>
    
    <form id="info" runat="server">
        <select id="sheng" name="province" ></select>
	    <select id="shi" name="city"></select>
	    <select id="xian" name="country" ></select>
	    <select id="xiang" name="street" ></select>
        
        <asp:HiddenField ID="hid_province" runat="server"/>
        <asp:HiddenField ID="hid_city" runat="server"/>
        <asp:HiddenField ID="hid_country" runat="server"/>
        <asp:HiddenField ID="hid_street" runat="server"/>

	    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" OnClientClick="BtnClick();" />
    </form>
</body>
</html>
